3.1.58 \(\int x^2 (a+b \sin (c+d x^3)) \, dx\) [58]

Optimal. Leaf size=25 \[ \frac {a x^3}{3}-\frac {b \cos \left (c+d x^3\right )}{3 d} \]

[Out]

1/3*a*x^3-1/3*b*cos(d*x^3+c)/d

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {14, 3460, 2718} \begin {gather*} \frac {a x^3}{3}-\frac {b \cos \left (c+d x^3\right )}{3 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^2*(a + b*Sin[c + d*x^3]),x]

[Out]

(a*x^3)/3 - (b*Cos[c + d*x^3])/(3*d)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3460

Int[(x_)^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Sin[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IntegerQ[Simpl
ify[(m + 1)/n]] && (EqQ[p, 1] || EqQ[m, n - 1] || (IntegerQ[p] && GtQ[Simplify[(m + 1)/n], 0]))

Rubi steps

\begin {align*} \int x^2 \left (a+b \sin \left (c+d x^3\right )\right ) \, dx &=\int \left (a x^2+b x^2 \sin \left (c+d x^3\right )\right ) \, dx\\ &=\frac {a x^3}{3}+b \int x^2 \sin \left (c+d x^3\right ) \, dx\\ &=\frac {a x^3}{3}+\frac {1}{3} b \text {Subst}\left (\int \sin (c+d x) \, dx,x,x^3\right )\\ &=\frac {a x^3}{3}-\frac {b \cos \left (c+d x^3\right )}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 41, normalized size = 1.64 \begin {gather*} \frac {a x^3}{3}-\frac {b \cos (c) \cos \left (d x^3\right )}{3 d}+\frac {b \sin (c) \sin \left (d x^3\right )}{3 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^2*(a + b*Sin[c + d*x^3]),x]

[Out]

(a*x^3)/3 - (b*Cos[c]*Cos[d*x^3])/(3*d) + (b*Sin[c]*Sin[d*x^3])/(3*d)

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 27, normalized size = 1.08

method result size
risch \(\frac {a \,x^{3}}{3}-\frac {b \cos \left (d \,x^{3}+c \right )}{3 d}\) \(22\)
derivativedivides \(\frac {\left (d \,x^{3}+c \right ) a -b \cos \left (d \,x^{3}+c \right )}{3 d}\) \(27\)
default \(\frac {\left (d \,x^{3}+c \right ) a -b \cos \left (d \,x^{3}+c \right )}{3 d}\) \(27\)
norman \(\frac {\frac {a \,x^{3}}{3}-\frac {2 b}{3 d}+\frac {a \,x^{3} \left (\tan ^{2}\left (\frac {d \,x^{3}}{2}+\frac {c}{2}\right )\right )}{3}}{1+\tan ^{2}\left (\frac {d \,x^{3}}{2}+\frac {c}{2}\right )}\) \(51\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a+b*sin(d*x^3+c)),x,method=_RETURNVERBOSE)

[Out]

1/3/d*((d*x^3+c)*a-b*cos(d*x^3+c))

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 21, normalized size = 0.84 \begin {gather*} \frac {1}{3} \, a x^{3} - \frac {b \cos \left (d x^{3} + c\right )}{3 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*sin(d*x^3+c)),x, algorithm="maxima")

[Out]

1/3*a*x^3 - 1/3*b*cos(d*x^3 + c)/d

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 23, normalized size = 0.92 \begin {gather*} \frac {a d x^{3} - b \cos \left (d x^{3} + c\right )}{3 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*sin(d*x^3+c)),x, algorithm="fricas")

[Out]

1/3*(a*d*x^3 - b*cos(d*x^3 + c))/d

________________________________________________________________________________________

Sympy [A]
time = 0.11, size = 31, normalized size = 1.24 \begin {gather*} \begin {cases} \frac {a x^{3}}{3} - \frac {b \cos {\left (c + d x^{3} \right )}}{3 d} & \text {for}\: d \neq 0 \\\frac {x^{3} \left (a + b \sin {\left (c \right )}\right )}{3} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(a+b*sin(d*x**3+c)),x)

[Out]

Piecewise((a*x**3/3 - b*cos(c + d*x**3)/(3*d), Ne(d, 0)), (x**3*(a + b*sin(c))/3, True))

________________________________________________________________________________________

Giac [A]
time = 3.85, size = 26, normalized size = 1.04 \begin {gather*} \frac {{\left (d x^{3} + c\right )} a - b \cos \left (d x^{3} + c\right )}{3 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*sin(d*x^3+c)),x, algorithm="giac")

[Out]

1/3*((d*x^3 + c)*a - b*cos(d*x^3 + c))/d

________________________________________________________________________________________

Mupad [B]
time = 4.66, size = 21, normalized size = 0.84 \begin {gather*} \frac {a\,x^3}{3}-\frac {b\,\cos \left (d\,x^3+c\right )}{3\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a + b*sin(c + d*x^3)),x)

[Out]

(a*x^3)/3 - (b*cos(c + d*x^3))/(3*d)

________________________________________________________________________________________